<?php echo $this->Html->css(array(
			    'datepicker.css'/*,
			    'Bootstrap.bootstrap-responsive.min.css'*/
			)); ?>
<section class="content-header">
	<h1>Socios<small> Nuevo</small></h1>
	<ol class="breadcrumb">
		<li>
      <?php echo $this->Html->link(
        $this->Html->tag('i', '', array('class' => 'fa fa-dashboard ')) . "Inicio",'/',   
        array('class' => '', 'escape' => false)
        ); 		
      ?> 
		</li>		
		<li>
      <?php echo $this->Html->link('Socios',array('controller'=>'members','action'=>'index')  ); 		
      ?> 
		</li>			
		<li class="active">Nuevo</li>
	</ol>
</section>
<?php 
	$option= array(
            'inputDefaults' => array(
                'div' => array(
                	'class' => 'form-group'
                ),
                'label' => array(
                	'class' => ' col-md-push'
                ),
                'between' => '<div class="col-lg-6 right">',
                'seperator' => '</div>',
                'after' => '</div>',
                'class' => 'form-control',
                'error' => array('attributes' => array('wrap' => 'span', 'class' => 'help-block')),
            ),
            'class' => 'form-horizontal box-body',
            'role' => 'form',
        );

?>
<section class="content">
	<div class="col-xs-8">
		<div class="box box-primary">
      <div class="box-header">
          <h2 class="box-title">Nuevo</h2>
      </div><!-- /.box-header -->
      <!-- form start -->
      <!--<form role="form">
          <div class="box-body">
					</div>
			</form> -->
			<?php echo $this->Form->create('Member',$option); ?>							
			<ul class="nav nav-tabs">  
				<li class="active"><a href="#titular" data-toggle="tab">Titular</a></li>
			  <li><a href="#profile" data-toggle="tab">Conyugue</a></li>
			</ul>

			<!-- Tab panes -->
			<div class="tab-content">
			  <div class="tab-pane active" id="titular">
			  	 <div class="box-header">
		          <h3 class="box-title">Titular</h3>
		      	</div>
			  	<?php echo $this->Form->input('code' ,array( 'label' => array( 'text' => __('Código:'),'class' => 'col-lg-2 control-label' )))?>
					<?php echo $this->Form->input('dni' ,array( 'label' => array( 'text' => __('Dni:'),'class' => 'col-lg-2 control-label' )))?>
					<?php echo $this->Form->input('lastname' ,array( 'label' => array( 'text' => __('Apellido:'),'class' => 'col-lg-2 control-label' )))?>
					<?php echo $this->Form->input('firstname' ,array( 'label' => array( 'text' => __('Nombre:'),'class' => 'col-lg-2 control-label' )))?>
					<?php echo $this->Form->input('address' ,array( 'label' => array( 'text' => __('Domicílio:'),'class' => 'col-lg-2 control-label' )))?>
					<?php echo $this->Form->input('catastro' ,array( 'label' => array( 'text' => __('Catastro:'),'class' => 'col-lg-2 control-label' )))?>
					<?php echo $this->Form->input('birthday' ,array( 'label' => array( 'text' => __('Fecha Nacimiento:'),'class' => 'col-lg-2 control-label' )))?>
					<?php echo $this->Form->input('job' ,array( 'label' => array( 'text' => __('Ocupación:'),'class' => 'col-lg-2 control-label' )))?>

					 <?php echo $this->Form->input('description' ,array( 'label' => array( 'text' => __('Descripcíon:'),'class' => 'col-lg-2 control-label' )))?>	
				
			  </div>
			  <div class="tab-pane" id="profile">
			  	<div class="box-header">
		          <h3 class="box-title">Conyugue</h3>
		      	</div>
			  	<div id="div_alt" style="display:block">
				  	<?php echo $this->Form->input('spouse_dni' ,array( 'label' => array( 'text' => __('Conyugue DNI:'),'class' => 'col-lg-2 control-label' )))?>	
				  	<?php echo $this->Form->input('spouse_firstname' ,array( 'label' => array( 'text' => __('Conyugue Nombre:'),'class' => 'col-lg-2 control-label' )))?>	
				  	<?php echo $this->Form->input('spouse_lastname' ,array( 'label' => array( 'text' => __('Conyugue Apellido:'),'class' => 'col-lg-2 control-label' )))?>	
				  	<?php echo $this->Form->input('spouse_birthday' ,array( 'label' => array( 'text' => __('Conyugue Fecha de Nacimiento:'),'class' => 'col-lg-2 control-label' )))?>	
				  	<?php echo $this->Form->input('spouse_job' ,array( 'label' => array( 'text' => __('Conyugue Ocupación:'),'class' => 'col-lg-2 control-label' )))?>	
				  </div>
			  </div>
			</div>
				
				<hr>
			  
			  
			 
				<div class="form-group">
			    <div class="col-sm-offset-2 col-sm-10">
			      <button type="submit" class="btn btn-info btn-flat">Guardar</button>
			      <?php echo $this->Html->link(__('Cancelar', true), array('controller' => 'members', 'action' => 'index' ),array('class'=>'btn btn-info btn-flat')); ?> 
			    </div>
			  </div>
			<?php echo $this->Form->end();?>
		</div>
	</div>
</section>
<?php 
		echo $this->Html->script(array(
    
    //'plugins/bootstrap.min.js',
    'bootstrap-datepicker.js'
		));
	?>
<script type="text/javascript">

	
	$(function(){

		$("#MemberBirthday").datepicker({
    	format: "dd/mm/yyyy"
		});
		$("#MemberSpouseBirthday").datepicker({
    	format: "dd/mm/yyyy"
		});

		$("#show_div").click(function(){
			alert("Hu");
		});

	});
</script>